package payroll.trans;

import payroll.Employee;

// public class ChangeAddressTransaction implements Transaction{
    //不再实现接口，让他extend
public class ChangeAddressTransaction extends ChangeEmployeeTransaction{
 
    private String newAddress;

    public ChangeAddressTransaction(int empId, String newAddress) {
        super(empId);
        this.newAddress = newAddress;
    }

    // @Override
    // public void execute() {
    //     Employee e = PayrollDatabase.getEmployee(empId);
    //     // e.setAddress(newAddress);
    //     doChange(e);

    // }

    protected void doChange(Employee e){
        e.setAddress(newAddress);
    }

}
